package com.dchh.android.suverynew.presenter.impl;

import com.dchh.android.suverynew.module.local.ICycleSelectMoudle;
import com.dchh.android.suverynew.module.local.impl.CycleSelectMoudle;
import com.dchh.android.suverynew.presenter.ICycleSelectPresenter;
import com.dchh.android.suverynew.view.ICycleSelectView;
import com.dhcc.android.base.common.bean.Period;

import java.io.InputStream;
import java.util.List;
import java.util.Map;

/**
 * Created by eric on 2016/8/11.
 */
public class CycleSelectPresenter implements ICycleSelectPresenter, CycleSelectMoudle.ICycleSelectMoudleListener {
    private ICycleSelectMoudle mCycleSelectMoudle;
    private ICycleSelectView mCycleSelectView;

    public CycleSelectPresenter(ICycleSelectView mCycleSelectView) {
        this.mCycleSelectView = mCycleSelectView;
        this.mCycleSelectMoudle = new CycleSelectMoudle(this);
    }

    @Override
    public void initData(InputStream inputStream) {
        this.mCycleSelectMoudle.initData(inputStream);
    }

    @Override
    public void restore() {

    }

    @Override
    public void onDataReturn(List<Map<String, String>> list) {
        this.mCycleSelectView.onInitDataReturn(list);
    }

    @Override
    public void onRestoreData(Period p) {

    }
}
